home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
F1 Licenseware
/
F1 Licenseware - Volume 1.iso
/
disks
/
049b.dms
/
049b.adf
/
MORE_SOURCE_CODE
/
Anagram_Challenge.AMOS
/
Anagram_Challenge.amosSourceCode
Wrap
AMOS Source Code
|
1992-02-26
|
2KB
|
58 lines
'Anagram Challenge
'By Thomas Lancaster
'
'
CHALLENGE
Procedure CHALLENGE
Cls 0 : Paper 0 : Pen 2
Print " "
NO_OF_WORDS=40 : MOST_LENGTH=1 : SCORE=0 : GOES=0
Dim WORD$(NO_OF_WORDS)
For COUNTER=1 To NO_OF_WORDS
Read WORD$(COUNTER)
SIZE=Len(WORD$(COUNTER))
If SIZE>MOST_LENGTH Then MOST_LENGTH=SIZE
Next COUNTER
Dim USED(MOST_LENGTH)
Repeat
For COUNT=1 To SIZE
USED(COUNT)=0
Next COUNT
WORD=Rnd(NO_OF_WORDS-1)+1
SIZE=Len(WORD$(WORD))
Print
NEW_WORD$=""
For COUNT=1 To SIZE
Repeat
LETTER=Rnd(SIZE-1)+1
Until USED(LETTER)=0
USED(LETTER)=1
LETTER$=Mid$(WORD$(WORD),LETTER,1)
NEW_WORD$=NEW_WORD$+LETTER$
Next COUNT
Print "Find an anagram of ";NEW_WORD$
Input GUESS$
If GUESS$=WORD$(WORD)
Print "Correct"
SCORE=SCORE+1
Else
Print "Incorrect"
Print "The correct answer was ";WORD$(WORD)
End If
GOES=GOES+1
Wait 50
Until GOES=10
Print
Print "You scored ";SCORE;" out of 10 correct."
If SCORE=10 Then Print "Perfect. Well done!"
Wait 50
End
Data "Greetings","Challenge","Banana","Hunted","Twelve"
Data "Animal","Green","Leopard","Yellow","Youthfulness"
Data "Mouse","Keyboard","Control","Theatre","Warmth"
Data "Shallow","Shell","Grapefruit","Teacher","Cards"
Data "Worry","Grumble","Reduce","Cover","Escape"
Data "View","Street","Saviour","Schematic","Train"
Data "Wasp","Necklace","Young","Broken","Silent"
Data "Living","Elephant","Minus","Torn","Taught"
End Proc